package com.maycur.ctrip; /**
 * Created by JoeyXin on 1/26/16.
 */

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement
public class Application {
    private static final Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        ApplicationContext ctx = SpringApplication.run(Application.class, args);

        logger.info("Starting Ctrip Ice server");

        IceServer iceServer = ctx.getBean(IceServer.class);
        String[] props = {"--Ice.Default.Package=com.maycur.ice"};
        iceServer.main("Ctrip Service", props);

        logger.info("Ice server shutdown.");
    }

}
